package com.njitzx.mapper;

import com.njitzx.entity.dto.OrderPageDTO;
import com.njitzx.entity.po.Order;
import java.io.Serializable;
import java.util.List;

import com.njitzx.entity.vo.OrderDetailVO;
import com.njitzx.entity.vo.OrderVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 * 订单表 Mapper 接口
 * </p>
 *
 * @author 周鑫
 * @since 2024-08-20
 */
@Mapper
public interface OrderMapper  {

    List<Order> select(Order order);

    Order selectById(Serializable orderId);

    void insert(Order order);

    void update(Order order);

    void deleteById(Serializable orderId);

    void deleteByIds(String[] split);

    Double getSalesAmount();

    Integer getCount();

    List<OrderVO> selectByPage(OrderPageDTO orderPageDTO);

    List<OrderDetailVO> selectVideoDetailById(Integer orderId);

    void updateStatus(Integer orderId);

    void updateharvestState(Integer orderId);


    @Select("select * from sp_order where order_number=#{tradeNo}")
    Order selectByOrderNumber(String tradeNo);
}
